﻿//using System;
//using System.Collections.Generic;
//using System.Text;
//using NUnit.Framework;
//using Microsoft.VisualStudio.CommandBars;
//using Rhino.Mocks;
//using System.Reflection;
//using EnvDTE80;
//using EnvDTE;
//using TSVNAddin.Core;

//namespace TSVNAddin.VS.Test
//{
//    [TestFixture]
//    public class CommandBarBuilderFixture
//    {
//        [Test]
//        public void SetupCommands()
//        {
//            var commandsRepository = MockRepository.GenerateMock<VSCommandsRepositoryAdapter>(null, null);
//            var resourceProxy = MockRepository.GenerateMock<ResourceProxy>();
//            var vsCommand = MockRepository.GenerateMock<VSCommandAdapter>((Command)null);

//            var menuTortorise = MockRepository.GenerateStub<CommandBar>();

//            var commandType = CommandType.AboutTortoiseSVNAddin;
//            resourceProxy.Expect(x => x.GetString(commandType.ToString())).Return("Command descr");
//            commandsRepository.Expect(x => x.AddCommand(commandType.ToString(), "Command descr", 0)).Return(vsCommand);
//            vsCommand.Stub(x => x.AddToCommandBar(menuTortorise));

//            var mainBar = MockRepository.GenerateMock<IMainBarAdapter>();
//            mainBar.Expect(x => x.AddTortoiseCommandBar()).Return(menuTortorise);

//            var commandBarBuilder = new CommandBarBuilder(commandsRepository, mainBar, resourceProxy);
//            commandBarBuilder.SetupCommands();

//            mainBar.VerifyAllExpectations();
//            menuTortorise.VerifyAllExpectations();
//        }
//    }
//}
